<template>
<div>
        <div class="left">
            <li>
            <a @click="click1">行业资讯</a>
        </li>
        <li>
            <a @click="click2">公司新闻</a>
        </li>
        </div>
        <div class="right">
            <h1>这里是公司新闻详情{{id}}</h1>
        </div>
    </div>
</template>

<script>
import Right1 from '@/components/Right1.vue'
import Right2 from '@/components/Right2.vue'
export default({
    props:['id'],
    data () {
        return {
            msg:1,
        }
    },
    methods: {
        click1(){
            this.msg=1;
            this.$router.push({path:'/news',query:{id:1,d:this.msg}}).catch(err => {});
        },
        click2(){
            this.msg=2;
            this.$router.push({path:'/news',query:{id:2,d:this.msg}}).catch(err => {});
        },
    },
    components: {
        Right1,
        Right2,
    }
})
</script>


<style scoped lang="scss">
    .left{
        float: left;
         width: 30%;
        li{
            height: 30px;
            line-height: 30px;
            background-color: #ccc;
        }
    }
</style>
